package com.lyz.mapDemo;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName MapDemo1
 * @Description lambda遍历
 * @Author 2214361854
 * @Date 2022/2/22 21:28
 * @Version 1.0
 */
public class MapDemo1 {
    public static void main(String[] args) {
        Map<String, Integer> hashMap = new HashMap<>();
        hashMap.put("小明",16);
        hashMap.put("小王",12);
        hashMap.put("小星",13);
        //lambda遍历
        hashMap.forEach((k,v) -> System.out.println(k+"=="+v));
    }
}
